Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@tpluscode/rdf-string
Advanced tools
Simplifies creating of RDF strings using ECMAscript templates
@tpluscode/rdf-string
Simplifies the construction of RDF strings (turtle, n-triples, SPARQL, etc.) by taking care of correctly serializing values to their string representation and automatically prefixing URIs.
The heart of the library are EcmaScript template string tag functions. All interpolated values are serialized according to the syntactic rules of the given RDF format.
Formats which support prefixes will automatically abbreviate the URIs and return the prefix declarations according to the specific syntax.
import * as RDF from '@rdfjs/data-model'
import { prefixes } from '@zazuko/rdf-vocabularies'
import namespace from '@rdfjs/namespace'
import { sparql } from '@zazuko/rdf-string'
const person = RDF.variable('person')
const PersonType = RDF.namedNode('http://example.com/Person')
const schema = namespace(prefixes.schema)
const name = "John"
const query = sparql`SELECT * WHERE {
${person} a ${PersonType} .
${person} ${schema.name} ${name} .
}`
query.toString()
The last line will return a complete query.
PREFIX schema: <http://schema.org/>
SELECT * WHERE {
?person a <http://example.com/Person> .
?person schema:name "John" .
}
TBD
TBD
1.3.4
xsd:decimal
would have been serialised as an xsd:integer
FAQs
Simplifies creating of RDF strings using ECMAscript templates
The npm package @tpluscode/rdf-string receives a total of 2,584 weekly downloads. As such, @tpluscode/rdf-string popularity was classified as popular.
We found that @tpluscode/rdf-string demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.